package com.atguigu.myRule;

import com.netflix.loadbalancer.IRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Auther:
 * @Description:
 * @Date: 2019/11/21 16:17
 */
@Configuration
public class MySelfRule {
    @Bean
    public IRule myRule() {
//        return new RandomRule();// 随机
//        return new RoundRobinRule();// 轮询
        return new RandomRule_ZGQ(); // 轮询，每个服务连续吊用五次
    }

}
